﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "IMarkWork" here, you must also update the reference to "IMarkWork" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IMarkWork
    {
        [OperationContract]
        DataSet MarkWork_GetList(out int itemCount, int currPage,int pageSize,int EmployeeID, DateTime _date);

        [OperationContract]
        DataSet MarkWork_GetWithEmployee(int EmployeeID,DateTime _date);

        [OperationContract]
        DataSet MarkWork_CountDateWorkNewMember(int EmployeeID, DateTime _date);

        [OperationContract]
        int MarkWork_InsertAuto(MarkWorkInfo eInfo);

        [OperationContract]
        int MarkWork_Insert(MarkWorkInfo eInfo);

        [OperationContract]
        bool MarkWork_Update(MarkWorkInfo eInfo);

        [OperationContract]
        bool MarkWork_UpdateOverTime(MarkWorkInfo eInfo);

        [OperationContract]
        DataSet MarkWork_GetEmployeeInfoByDate(int EmployeeID, DateTime _date);

        [OperationContract]
        MarkWorkInfo MarkWork_GetInfo(int MarkWorkID);

        [OperationContract]
        bool MarkWork_CheckExistEmployee(int EmployeeID, DateTime _date);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class MarkWorkInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        
        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        int _ShiftID;
        [DataMember]
        public int ShiftID
        {
            get { return _ShiftID; }
            set { _ShiftID = value; }
        }

        DateTime _CheckDate;
        [DataMember]
        public DateTime CheckDate
        {
            get { return _CheckDate; }
            set { _CheckDate = value; }
        }

        int _CheckStatus;
        [DataMember]
        public int CheckStatus
        {
            get { return _CheckStatus; }
            set { _CheckStatus = value; }
        }

        bool _CheckIsInsert;
        [DataMember]
        public bool CheckIsInsert
        {
            get { return _CheckIsInsert; }
            set { _CheckIsInsert = value; }
        }

        DateTime _TimeIn;
        [DataMember]
        public DateTime TimeIn
        {
            get { return _TimeIn; }
            set { _TimeIn = value; }
        }

        DateTime _TimeOut;
        [DataMember]
        public DateTime TimeOut
        {
            get { return _TimeOut; }
            set { _TimeOut = value; }
        }

        DateTime _TimeInB;
        [DataMember]
        public DateTime TimeInB
        {
            get { return _TimeInB; }
            set { _TimeInB = value; }
        }

        DateTime _TimeOutB;
        [DataMember]
        public DateTime TimeOutB
        {
            get { return _TimeOutB; }
            set { _TimeOutB = value; }
        }

        decimal _OverTime;
        [DataMember]
        public decimal OverTime
        {
            get { return _OverTime; }
            set { _OverTime = value; }
        }

        decimal _NightOverTime;
        [DataMember]
        public decimal NightOverTime
        {
            get { return _NightOverTime; }
            set { _NightOverTime = value; }
        }

        decimal _NightShiftTime;
        [DataMember]
        public decimal NightShiftTime
        {
            get { return _NightShiftTime; }
            set { _NightShiftTime = value; }
        }

        decimal _OffTime;
        [DataMember]
        public decimal OffTime
        {
            get { return _OffTime; }
            set { _OffTime = value; }
        }

        decimal _HolidayTime;
        [DataMember]
        public decimal HolidayTime
        {
            get { return _HolidayTime; }
            set { _HolidayTime = value; }
        }

        decimal _WorkTime;
        [DataMember]
        public decimal WorkTime
        {
            get { return _WorkTime; }
            set { _WorkTime = value; }
        }

        decimal _Cong;
        [DataMember]
        public decimal Cong
        {
            get { return _Cong; }
            set { _Cong = value; }
        }

        bool _IsWorking;
        [DataMember]
        public bool IsWorking
        {
            get { return _IsWorking; }
            set { _IsWorking = value; }
        }

        string _StatusWorking;
        [DataMember]
        public string StatusWorking
        {
            get { return _StatusWorking; }
            set { _StatusWorking = value; }
        }
    }
}
